﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 实验5
{
    public class Book
    {
        private int id;
        private string name;
        private int price;
        private string publisher;
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public int Price
        {
            get { return price; }
            set { price= value; }
        }
        public string Publisher
        {
            get { return publisher; }
            set { publisher = value; }
        }
        public Book()
        {
            ;
        }
        public Book(int m_id, string m_name, int m_price, string m_publisher)
        {
            id = m_id;
            name = m_name;
            price = m_price;
            publisher = m_publisher;
            Console.Write("我有一本编号{0}的{1},价格为{2}，出版社为{3}\n", id, name, price, publisher);
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Book b1 = new Book();
            b1.Id = 1;
            b1.Name = "C++";
            b1.Price = 100;
            b1.Publisher = "洁希";
            Console.Write("我有一本编号{0}的{1},价格为{2}，出版社为{3}\n", b1.Id, b1.Name, b1.Price, b1.Publisher);
            Book b2 = new Book(1,"C++",100,"洁希");
        }
    }
}
